import skimage.io as io
import os

dirname = 'D:\\PointFlowRenderer\\'
#
#
filenames = [os.path.join(dirname, filename) for filename in os.listdir(dirname)]
#filenames = ['D:\\PointFlowRenderer\\1145_mesh.png']
for filename in filenames:
    if filename.endswith('jpg') or filename.endswith('.png') or filename.endswith('cloud.png'):
        if filename.endswith('image_hmr.png') or filename.endswith('image_origin.png') or filename.endswith('image_vibe.png'):
            continue
        image = io.imread(filename)
        image = image[0:-200, 300:-300, :]
        io.imsave(filename[0:-4] + "_cut" + filename[-4::], image)

